#include<linux/module.h>
#include<linux/init.h>
MODULE_LICENSE("GPL");
static int __init find_symbol_init(void);
static void __exit find_symbol_exit(void);

int __init find_symbol_init(void)
{
	const char *name="symbol_A";
	struct kernel_symbol *ksymbol;
	struct module *owner;
	const unsigned long *crc;
	bool gplok=true;
	bool warn=true;
	ksymbol=find_symbol(name,&owner,&crc,gplok,warn);
	if(ksymbol !=NULL)
	{
		printk("ksymbol->value: %lx\n",ksymbol->value);	
		printk("ksymbol->name: %s\n",ksymbol->name);	
	}
	else
		printk("failed to find symbol %s\n",name);

	if(owner != NULL)
	{
		printk("owner->name :%s\n",owner->name);	
	}
	if(crc != NULL)
	{
		printk("crc : %lx\n,",*crc);	
	}
	return 0;
}
void __exit find_symbol_exit(void)
{
	printk("module exit ok!\n");
}
module_init(find_symbol_init);
module_exit(find_symbol_exit);
